using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.VisualBasic.CompilerServices;
using System.Diagnostics;

namespace Berko
{
    public partial class frmExcel : Form
    {
        public frmExcel()
        {
            InitializeComponent();
        }

        private void cmdSalir_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void cmdVerTrab_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            this.cmdVerTrab.Enabled = false;
            if (this.cboCategorias2.SelectedIndex == 0)
            {
                GeneradorExcel.Crear_Excel(this.cboCategorias2.Text, true);
            }
            else
            {
                GeneradorExcel.Crear_Excel(this.cboCategorias2.Text, false);
            }
            try
            {
                Process.Start(@"C:\clientes.xls");
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                ProjectData.ClearProjectError();
            }
            this.Cursor = Cursors.Default;
            this.cmdVerTrab.Enabled = true;
        }

        private void frmExcel_Load(object sender, EventArgs e)
        {
            this.cboCategorias2.SelectedIndex = 0;
        }

    }
}